<!--
 * @Author: your name
 * @Date: 2021-10-15 16:52:24
 * @LastEditTime: 2021-11-29 14:48:41
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \xbsg-wx\pages\energy\energy.vue
-->
<!-- 水电气首页 -->
<template>
	<view class="page" v-if="menus.length>0">
		<view class="xb-card utilities" v-if="jlgl.look">
			<view class="utilities_t">记录管理</view>
			<view class="utilities-c" v-if="jlgl.children.length>0">
				<view class="utilities-col" hover-class="button-hover" v-if="item.look" v-for="(item,index) in jlgl.children" :key="index" @click="navTo(item.router)">
					<image :src="item.iconPath" mode="" :style="{backgroundColor: item.bgColor}"></image>
					<view class="">
						{{item.menuName}}
					</view>
				</view>
			</view>
		</view>
		
		<view class="xb-card utilities" v-if="sbzl.look">
			<view class="utilities_t">设备资料</view>
			<view class="utilities-c" v-if="sbzl.children.length>0">
				<view class="utilities-col" hover-class="button-hover" v-if="item.look" v-for="(item,index) in sbzl.children" :key="index" @click="navTo(item.router)">
					<image :src="item.iconPath" mode="" :style="{backgroundColor: item.bgColor}"></image>
					<view class="">
						{{item.menuName}}
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menus:[],
				jlgl:[],
				sbzl:[]
			};
		},
		onLoad(option) {
			this.menus=this.$store.state.com.routerData
			console.log("this.$store.state.com.routerData",this.$store.state.com.routerData);
			this.jlgl=this.menus[0]
			this.sbzl=this.menus[1]
			console.log("eng",this.jlgl);
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>

</style>
